﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="_estadio.ascx.cs" Inherits="BoxScore.stadium._estadio" %>
    
    <script type="text/javascript">
//<![CDATA[        
        var map;

        function initialize() {
            var latlng = new google.maps.LatLng(-34.397, 150.644);
            var myOptions = {
                zoom: 5,
                center: latlng,
                mapTypeId: google.maps.MapTypeId.ROADMAP
            };
            map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
        }

        google.maps.event.addDomListener(window, 'load', initialize);
    
    
        $(document).ready(function() {
            //        var lat = $('id$="latitud"').val;
            //        var lng = $('id$="longitud"').val;

            //        var latlng = new google.maps.LatLng(lat, lng);
            //        var myOptions = {
            //            zoom: 10,
            //            center: latlng,
            //            mapTypeId: google.maps.MapTypeId.ROADMAP
            //        };
            //        var map = new google.maps.Map(document.getElementById("map"), myOptions);

        
        });
//        ]]>
    </script>

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
    DataSourceID="ObjectDataSource1" Width="100%">
    <Columns>
        <asp:TemplateField ShowHeader="False">
            <ItemTemplate>
                <asp:HiddenField ID="latitud" runat="server" Value='<%# Eval("latitud") %>' />
                <asp:HiddenField ID="longitud" runat="server" Value='<%# Eval("longitud") %>' />

                <div id="map_canvas">
                
                </div>
                <h3>
                <asp:Label ID="Label1" runat="server" Text='<%# Eval("name", "{0}") %>'></asp:Label>
                </h3>
                
                <asp:Label ID="Label2" runat="server" Text='<%# Eval("direccion") %>'></asp:Label>
                
            </ItemTemplate>
        </asp:TemplateField>
    </Columns>
</asp:GridView>
<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
    SelectMethod="getEstadiumByLeague" TypeName="BoxScore.Model.BoxScoreBD">
    <SelectParameters>
        <asp:QueryStringParameter Name="idLeague" QueryStringField="id" Type="Int32" />
    </SelectParameters>
</asp:ObjectDataSource>


